package itsm.isperp.module.repository.app;

import itsm.isperp.framework.data.mybatis.dao.TreeNodeMapper;
import itsm.isperp.framework.web.request.JqGridRequest;
import itsm.isperp.module.entity.app.AppMenu;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 
 * 菜单映射器(创建绑定映射语句的接口)
 * 
 * @author lizx
 * @date 2013-1-12
 * @version V1.0
 */
@Repository
public interface AppMenuMapper extends TreeNodeMapper<AppMenu> {

	/**
	 * 获取角色定义的菜单
	 * 
	 * @param request
	 *            数据请求
	 * @return 菜单列表
	 */
	public List<AppMenu> findRoleMenuByRequest(JqGridRequest request);

	/**
	 * 获取用户自定义的菜单
	 * 
	 * @param request
	 *            数据请求
	 * @return 菜单列表
	 */
	List<Map<String, Object>> findRoleCustomMenuByRequest(
			@Param("username") String username, JqGridRequest request);

}
